package com.gk.panda.apis.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gk.panda.apis.Vo.BiologyFileVo;
import com.gk.panda.apis.dto.BiologyFileSaveDto;
import com.gk.panda.apis.dto.BiologyFileSearchDto;
import com.gk.panda.pojo.BiologyFile;
import org.springframework.web.multipart.MultipartFile;

public interface BiologyFileService extends IService<BiologyFile> {

    /**
     * 分页查询生物附件
     * @param dto
     * @return
     */
    Page<BiologyFileVo> listBiologyFile(BiologyFileSearchDto dto);

    /**
     * 添加生物附件
     * @param dto
     * @return
     */
    boolean addBiologyFile(BiologyFileSaveDto dto);

    /**
     * 删除生物附件
     * @param id
     * @return
     */
    int deleteBiologyFile(String id);

    /**
     * 根据附件id将附件设置为卡片封面
     * @param id
     * @return
     */
    boolean setCover(int id);

    /**
     * 批量上传生物附件
     * @param files
     * @return
     */
    String uploadBatch(Integer kingdom, String biologyName, MultipartFile[] files);
}
